<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="__UI__/css/bs3/dpl.css" rel="stylesheet" type="text/css" />
<link href="__UI__/css/bs3/bui.css" rel="stylesheet" type="text/css" />
<link href="__UI__/css/style.css" rel="stylesheet" type="text/css" />
<link href="__UI__/uploadify/uploadify.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__UI__/js/jquery-1.8.1.min.js"></script>
<style type="text/css">

button {
	margin-right:20px;
}

.buttons {
    display: inline-block;
    margin-bottom: 0;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 20px;
    padding: 4px 12px;
    font-size: 14px;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: #ffffff;
    background-color: #000000;
    border-color: #cccccc;
}

.staff {
	width:610px;
	height:auto;
	min-height:30px;
	margin-top:-20px;
	border:0px;
	overflow:hidden;
}

.bui-select-list {
	margin-left:10px;
}

.bui-select-list ul {
	height:auto;
	min-height:30px;
	overflow:hidden;
}

.staff li {
	float:left;
	display:inline-block;
	width:150px;
	line-height:30px;
}

#tabbox {
	width:96%;
	overflow:hidden;
	margin:0 auto;
}

.tab_conbox {
	border: 1px solid #999;
	border-top: none;
}

.tab_con {
	display:none;
}

.tabs {
	width: 100%;
	height: 32px;
	border-bottom:1px solid #999;
	border-left: 1px solid #999;
}

.tabs li {
	float:left;
	height:31px;
	line-height:31px;
	border:1px solid #999;
	border-left:none;
	margin-bottom: -1px;
	background: #e0e0e0;
	overflow: hidden;
	position: relative;
}

.tabs li a {
	display: block;
	padding: 0 20px;
}

.tabs li a:hover {
	background: #ccc;
}	

.tabs .thistab,.tabs .thistab a:hover {
	background: #fff;
}

.tab_con {
	padding:12px;
	font-size: 14px;
	line-height:175%;
}

.control-group .controls{
	float:none;
	margin-bottom:20px;
}

.con{
	width:80%;
	margin:20px auto;
	height:auto;
}

</style>

</head>
<body>
<div class="demo-content" style="margin-top:1%;">
	<div class="row" style="width:90%; margin:0px auto;">	
    <div style="text-align:center"><h2>{$scripts.scriptsname} - 场景演练</h2><hr></div>
        <div class="form-horizontal">
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h3>部门总结</h3></label>
                    <div id="tabbox">
                        <ul class="tabs" id="tabs">
                            <volist name="department" id="vo" key="k">
                                <li <if condition="$k eq I('get.did')">class="active"</if>><a href="{:U('Home/Drill/main', array('sid'=>I('get.sid'),'pid'=>I('get.pid'),'did'=>$k))}">{$vo}</a></li>
                            </volist>
                        </ul>
                        <ul class="tab_conbox" id="tab_conbox">
                            <volist name="department" id="vo" key="k">
                        		<li class="tab_con">
								<form id="J_Form" action="{:U('Home/Record/edit')}" class="form-horizontal registerform" method="post" enctype="multipart/form-data">
                        			<div id="panel" class="" style="padding:10px;">
                                        <input name="uid" type="hidden" value="{:session('gid')}">
                                        <input name="mid" type="hidden" value="{:session(C('AUTH_KEYS'))}">
                                        <input name="sid" type="hidden" value="{:I('get.sid')}">
                                        <input name="pid" type="hidden" value="{:I('get.pid')}">
                                        <div class="control-group">
                                            <label class="control-label">{$vo}</label>
                                            <div class="controls">
                                                <textarea name="report[{$k}][file]" datatype="*" nullmsg="请输入响应提示！" data-tip="{text:'请输入响应提示'}" style="width:600px; height:100px; " id="add"></textarea>
<script>
	function  f_getURL(){
        var url = "{:U('Drill/acceptfile')}";
        return url;
    }
    function f_getMAX(){
        return 60*60*1;//最长录音时间
    }
    function f_getMIN(){
        return 1; //最小录音时间
    }
    function f_complete(filename){
		alert(filename);
		$('#voice').append('<input name="report[{$k}][voice]" type="hidden" value="./Public/voice/'+filename+'">');
    }
</script>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="808" height="140" id="as_js" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="movie" value="__UI__/voice/bbsRecorder.swf" />
	<param name="quality" value="high" />
	<param name="wmode" value="transparent">
	<param name="bgcolor" value="#cccccc" />
	<embed src="__UI__/voice/bbsRecorder.swf" vmode="transparent" quality="high" bgcolor="#cccccc" width="808" height="140" name="as-js" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
                                        <div id="voice"></div>                                  
                                    </div>
                                    <div class="row actions-bar" style="background:none; border:0px;">
                                        <span id="msgdemo2"></span>
                                        <div class="form-actions span13 offset3">
                                            <button class="button button-primary" id="section">提交响应</button>
                                        </div>
                                    </div>
                        		</form>
                                </li>
                            </volist>
                        </ul>
                    </div>                   
				</div>
            </div>
            <div class="row actions-bar">
				<div class="form-actions span13">
                	<a class="button button-info btn-start" id="step">下一步</a>
				</div>
			</div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__UI__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__UI__/js/config.js"></script>
<script type="text/javascript" src="__UI__/js/bui.js"></script>
<script type="text/javascript" src="__UI__/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">
	$(function () {       
		$('#step').click(function(){
			top.topManager.openPage({
				id:'record_mains',
				title:'演练总结',
				href:'{:U("Record/mains",array("sid"=>I("get.sid"),"pid"=>I("get.pid"),"cid"=>I("get.cid")))}',
				isClose:false,
				reload:true,
			});
		});
    });
	BUI.use('bui/form', function (Form) {
        new Form.Form({
            srcNode:'#J_Form'
        }).render();
    });
	$(document).ready(function() {
		jQuery.jqtab = function(tabtit,tab_conbox,shijian) {
			$(tab_conbox).find("li").hide();
			$(tabtit).find("li:first").addClass("thistab").show(); 
			$(tab_conbox).find("li:first").show();
		
			$(tabtit).find("li").bind(shijian,function(){
			  $(this).addClass("thistab").siblings("li").removeClass("thistab"); 
				var activeindex = $(tabtit).find("li").index(this);
				$(tab_conbox).children().eq(activeindex).show().siblings().hide();
				return false;
			});
		
		};
		$.jqtab("#tabs", "#tab_conbox", "click");	
	});

	$(function(){
		$(".registerform").Validform({
			tiptype:function(msg,o,cssctl){
				var objtip=$("#msgdemo2");
				cssctl(objtip,o.type);
				objtip.text(msg);
			},
			ajaxPost:true,
			callback:function(data){
				if(data.status == 'y'){
					window.location.reload();
				}
			},
		});
	})
</script>
</body>
</html>